%module OgreSceneManager

%{
#include "OGRE/OgreSceneManager.h"
	%}

%import "OgreString.i"
%import "OgrePlatform.h"
%import "OgreVector3.i"
%import "OgreCamera.i"
%import "OgreEntity.i"
%import "OgreLight.i"
%import "OgrePlane.i"
%import "OgreQuaternion.i"
%import "OgreSceneNode.i"
%import "OgreCommon.i"
 //%import "OgreViewPort.i"

 /*


#include "OgrePlane.h"
#include "OgreQuaternion.h"
#include "OgreColourValue.h"
#include "OgreCommon.h"
#include "OgreSceneQuery.h"
#include "OgreAutoParamDataSource.h"
#include "OgreAnimationState.h"
#include "OgreRenderQueue.h"
#include "OgreRenderQueueSortingGrouping.h"
#include "OgreRectangle2D.h"
#include "OgrePixelFormat.h"
#include "OgreResourceGroupManager.h"
#include "OgreTexture.h"
#include "OgreShadowCameraSetup.h"
#include "OgreShadowTextureManager.h"
#include "OgreCamera.h"
#include "OgreInstancedGeometry.h"
#include "OgreLodListener.h"
#include "OgreRenderSystem.h"
 */

namespace Ogre {

    struct ViewPoint
    {
        Vector3 position;
        Quaternion orientation;
    };

    class SceneManager // : public SceneMgtAlloc
    {
    public:
	    static uint32 WORLD_GEOMETRY_TYPE_MASK;
	    static uint32 ENTITY_TYPE_MASK;
	    static uint32 FX_TYPE_MASK;
	    static uint32 STATICGEOMETRY_TYPE_MASK;
	    static uint32 LIGHT_TYPE_MASK;
	    static uint32 FRUSTUM_TYPE_MASK;
	    static uint32 USER_TYPE_MASK_LIMIT;

	    const String& getName(void) const { return mName; }

	    virtual const String& getTypeName(void) const = 0;


	    virtual Camera* createCamera(const String& name);

	    virtual Camera* getCamera(const String& name) const;

	    virtual bool hasCamera(const String& name) const;

	    virtual void destroyCamera(Camera *cam);

	    virtual void destroyCamera(const String& name);

	    virtual void destroyAllCameras(void);


	    virtual Light* createLight(const String& name);

	    virtual Light* createLight();

	    virtual Light* getLight(const String& name) const;

	    virtual bool hasLight(const String& name) const;

	    virtual void destroyLight(const String& name);

	    virtual void destroyLight(Light* light);

	    virtual void destroyAllLights(void);


	    virtual SceneNode* createSceneNode(void);

	    virtual SceneNode* createSceneNode(const String& name);

	    virtual void destroySceneNode(const String& name);

	    virtual void destroySceneNode(SceneNode* sn);

	    virtual SceneNode* getRootSceneNode(void);

	    virtual SceneNode* getSceneNode(const String& name) const;

	    virtual bool hasSceneNode(const String& name) const;


	    virtual Entity* createEntity(const String& entityName, const String& meshName, const String& groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME );

	    virtual Entity* createEntity(const String& meshName);

	    enum PrefabType {
		    PT_PLANE,
		    PT_CUBE,
		    PT_SPHERE
	    };

	    virtual Entity* createEntity(const String& entityName, PrefabType ptype);

	    virtual Entity* createEntity(PrefabType ptype);

	    virtual Entity* getEntity(const String& name) const;

	    virtual bool hasEntity(const String& name) const;

	    virtual void destroyEntity(Entity* ent);

	    virtual void destroyEntity(const String& name);

	    virtual void destroyAllEntities(void);


	    virtual void clearScene(void);


	    void setAmbientLight(const ColourValue& colour);

	    const ColourValue& getAmbientLight(void) const;

	    virtual ViewPoint getSuggestedViewpoint(bool random = false);

	    virtual void setSkyPlane(
		    bool enable,
		    const Plane& plane, const String& materialName, Real scale = 1000,
		    Real tiling = 10, bool drawFirst = true, Real bow = 0, 
		    int xsegments = 1, int ysegments = 1, 
		    const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);

	    virtual void setSkyBox(
		    bool enable, const String& materialName, Real distance = 5000,
		    bool drawFirst = true, const Quaternion& orientation = Quaternion::IDENTITY,
		    const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);

	    virtual void setSkyBoxEnabled(bool enable) { mSkyBoxEnabled = enable; }

	    virtual bool isSkyBoxEnabled(void) const { return mSkyBoxEnabled; }

	    virtual SceneNode* getSkyBoxNode(void) const { return mSkyBoxNode; }

	    virtual void setSkyDome(
		    bool enable, const String& materialName, Real curvature = 10,
		    Real tiling = 8, Real distance = 4000, bool drawFirst = true,
		    const Quaternion& orientation = Quaternion::IDENTITY,
		    int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
		    const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);

	    void setFog(
		    FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White,
		    Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0);

	    virtual FogMode getFogMode(void) const;


	    virtual void showBoundingBoxes(bool bShow);

	    virtual bool getShowBoundingBoxes() const;

//	    virtual AxisAlignedBoxSceneQuery* 
//            createAABBQuery(const AxisAlignedBox& box, unsigned long mask = 0xFFFFFFFF);
//	    virtual SphereSceneQuery* 
//		    createSphereQuery(const Sphere& sphere, unsigned long mask = 0xFFFFFFFF);

//	    virtual PlaneBoundedVolumeListSceneQuery* 
//		    createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList& volumes, unsigned long mask = 0xFFFFFFFF);


//	    virtual RaySceneQuery* 
//		    createRayQuery(const Ray& ray, unsigned long mask = 0xFFFFFFFF);

//	    virtual IntersectionSceneQuery* 
//		    createIntersectionQuery(unsigned long mask = 0xFFFFFFFF);

//	    virtual void destroyQuery(SceneQuery* query);

//	    Viewport* getCurrentViewport(void) const { return mCurrentViewport; }

    };

/*
    class DefaultIntersectionSceneQuery : public IntersectionSceneQuery
    {
    public:
	    void execute(IntersectionSceneQueryListener* listener);
    };
    
    class DefaultRaySceneQuery : public RaySceneQuery
    {
    public:
        void execute(RaySceneQueryListener* listener);
    };

    class DefaultSphereSceneQuery : public SphereSceneQuery
    {
    public:
        void execute(SceneQueryListener* listener);
    };

    class DefaultPlaneBoundedVolumeListSceneQuery : public PlaneBoundedVolumeListSceneQuery
    {
    public:
        void execute(SceneQueryListener* listener);
    };

    class DefaultAxisAlignedBoxSceneQuery : public AxisAlignedBoxSceneQuery
    {
    public:
        void execute(SceneQueryListener* listener);
    };
*/
    typedef uint16 SceneTypeMask;

    enum SceneType
    {
	    ST_GENERIC = 1,
	    ST_EXTERIOR_CLOSE = 2,
	    ST_EXTERIOR_FAR = 4,
	    ST_EXTERIOR_REAL_FAR = 8,
	    ST_INTERIOR = 16
    };

} // Namespace
